<include file="../Public/header" />
<script data-main="__PUBLIC__/admin/js/page/admin/global/editarea" src="__PUBLIC__/admin/js/lib/requirejs/require.js"></script>
</head>

<body>
  <div class="page">
    <div class="page-hd">
      <h1>{$Think.lang.areaConfig}</h1>
    </div>

    <div class="form">
      <php>if($type=="edit") {</php>
      <form id="J_form" data-type="edit" action="{:URL('admin/Global/doEditArea')}" method="post">
        <input type="hidden" id="area_id" name="area_id" value="{$area_id}" />
        <php>}else {</php>
        <form id="J_form" data-type="add" 1action="{:URL('admin/Global/doAddArea')}" method="post">
          <php>}</php>
          <input type="hidden" id="pid" name="pid" value="{$pid}" />
          <dl class="kv">
            <dt>{$Think.lang.areaName}：</dt>
            <dd>
              <input class="input-text" type="text" name="title" id="title" value="{$title}" required />
              <div class="kv-error"></div>
            </dd>
          </dl>
          <dl class="kv">
            <dt>{$Think.lang.parentsArea}：</dt>
            <dd>
              <select id="J_province" name="selProvince" data-id="{$province_id}">
                <option value="0">--{$Think.lang.province}--</option>
                <volist id="vo" name="province">
                  <option value="{$vo.area_id}">{$vo.title}</option>
                </volist>
              </select>
              <select id="J_city" name="selCity" data-id="{$city_id}">
                <option selected value="0">--{$Think.lang.city}--</option>
                <volist id="vo" name="city">
                  <option value="{$vo.area_id}">{$vo.title}</option>
                </volist>
              </select>
            </dd>
          </dl>
          <div class="actions">
            <input type="submit" value="{$Think.lang.OK}" class="btn btn-y" />
            <a href="{:URL('admin/Global/area')}" class="btn btn-n">{$Think.lang.cancel}</a>
          </div>
        </form>
    </div>
  </div>
</body>

</html>
